<template>
  <div class="test">
    son
    <el-button @click="click">111</el-button>
    <hr />
    <Sonson
      v-on="{ ...$listeners, ...obj, ...$attrs }"
      v-bind="$attrs"
      v-model="name"
    ></Sonson>
  </div>
</template>

<script>
import { ref } from "vue";
import Sonson from "./Sonson.vue";
export default {
  emits: ["increment"],
  components: { Sonson },
  setup(props, { emit, listeners }) {
    const name = ref("name默认值");
    console.log(listeners);
    const click = () => {
      emit("increment");
    };
    const obj = {
      add: () => {
        console.log("add");
      },
    };
    return {
      name,
      click,
      obj,
    };
  },
};
</script>

<style scoped lang="less"></style>
